package com.zhyl.demo.service;

import com.zhyl.demo.entity.Appointment;

import java.util.ArrayList;
import java.util.Date;

/**
 * @author yang3
 */
public interface AppointmentService {
    /**
     * 获取某一位病人的所有预约信息
     * @param patid
     * @return
     */
    ArrayList<Appointment> loadAppointments(Integer patid);

    /**
     * 新建预约
     * @param appointment
     * @return
     */
    Boolean newAppointment(Appointment appointment);

    /**
     * 获取一名医生在特定日期下的预约数量
     * @param docId
     * @param time
     * @return
     */
    Integer getNowDayAppointment(int docId, String time);

    /**
     * 更新预约信息
     * @param appointment
     * @return
     */
    Integer updateAppointmentDetail(Appointment appointment);

    /**
     * 获取预约详情
     * @param id
     * @return
     */
    Appointment getAppointmentDetail(int id);

    /**
     * 获取该医生下所有预约
     * @param docId
     * @return
     */
    ArrayList<Appointment> getDocAppointment(int docId);

    /**
     * 结束该次预约
     * @param appointmentId
     * @return
     */
    Boolean completeAppointment(int appointmentId);

    /**
     * 叫号病人
     * @param id
     * @return
     */
    Boolean callPatient(int id);

    /**
     * 取消叫号
     * @param id
     * @return
     */
    Boolean cancelCall(int id);

    /**
     * 检查当前叫号人数
     * @param docId
     * @return
     */
    Integer checkCall(int docId);

    /**
     * 通过医生id查询该医生名下所有预约信息
     * @param docId
     * @return
     */
    ArrayList<Appointment> selectByDoc(int docId);

    ArrayList<Appointment> searchPatient(Integer patId, int docId);

    /**
     * 取消预约
     * @param appointmentId
     * @return
     */
    Boolean cancelAppointment(int appointmentId);

    Boolean deleteAppointment(int appointmentId);

    Boolean huayan(Integer appointmentId);
}
